package gui;



import java.awt.BorderLayout;

import java.awt.Component;

import java.awt.Font;

import java.awt.ScrollPane;

import java.awt.event.ActionListener;



import javax.swing.Box;

import javax.swing.JButton;

import javax.swing.JLabel;

import javax.swing.JPanel;

import javax.swing.JScrollPane;

import javax.swing.JTable;



import data.UserTableModel;



public class ShowAll extends JPanel {

	private ScrollPane scrollPane;
	private JTable table;
	private JButton btnMenu;
	private JTable showAllTable;

	public ShowAll() {
		setLayout(new BorderLayout(0, 0));
		Box horizontalBox_1 = Box.createHorizontalBox();
		add(horizontalBox_1, BorderLayout.NORTH);

		JLabel lblAllUsers = new JLabel("All Users");
		lblAllUsers.setFont(new Font("Tahoma", Font.BOLD, 15));
		horizontalBox_1.add(lblAllUsers);

		Box horizontalBox = Box.createHorizontalBox();
		add(horizontalBox, BorderLayout.SOUTH);

		btnMenu = new JButton("Menu");
		btnMenu.setAlignmentY(Component.BOTTOM_ALIGNMENT);
		horizontalBox.add(btnMenu);

		JScrollPane scrollPane_1 = new JScrollPane();
		add(scrollPane_1, BorderLayout.CENTER);

		showAllTable = new JTable(new UserTableModel());
		scrollPane_1.setColumnHeaderView(showAllTable);		

	}

	public void addActionListener(ActionListener l) {
		btnMenu.addActionListener(l);
	}

	public JButton getBtnMenu() {
		return btnMenu;
	}

	public ScrollPane getScrollPane() {
		return scrollPane;
	}

}
